<template>
  <div  :style="{'top' : offset ? (offset+'px') : 0}" id="wrapper">
    <div class="iScroller" id="scroller">
      <slot></slot>
    </div>
  </div>
</template>
<style lang="scss">
  #wrapper {
    position: absolute;
    z-index: 1;
    top: 40px;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    overflow: hidden;
  }
  .iScroller {
    position: absolute;
    z-index: 1;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    width: 100%;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    -o-text-size-adjust: none;
    text-size-adjust: none;
  }

  .pullDown,.pullUp {
    /*background:#fff;*/
    padding:5px 0px;
    /*border-bottom:1px solid #ccc;*/
    font-weight:bold;
    font-size:14px;
    color:#888;
    margin-top:0;
    white-space: nowrap;
    font-size:14px;
    text-align: center;
  }

  .pullDown.scrolledUp{
    margin-top:-51px;	/* Should match the totalt height (i.e. height + paddings + borders) of #pullDown set above */
  }
  .pullDown .pullDownLabel, .pullUp .pullUpLabel  {
    margin: 0 5px;
  }
  .pullDown .pullDownIcon, .pullUp .pullUpIcon  {
    display: inline-block;
    width:40px; height:40px;
    background:url(pull-icon@2x.png) 0 0 no-repeat;
    -webkit-background-size:40px 80px; background-size:40px 80px;
    -webkit-transition-property:-webkit-transform;
    -webkit-transition-duration:250ms;
    vertical-align: middle;
    margin: 0 5px;
  }
  .pullDown .pullDownIcon {
    -webkit-transform:rotate(0deg) translateZ(0);
    transform:rotate(0deg) translateZ(0);
  }
  .pullUp .pullUpIcon  {
    -webkit-transform:rotate(-180deg) translateZ(0);
    transform:rotate(-180deg) translateZ(0);
  }
  .pullDown.flip .pullDownIcon {
    -webkit-transform:rotate(-180deg) translateZ(0);
    transform:rotate(-180deg) translateZ(0);
  }
  .pullUp.flip .pullUpIcon {
    -webkit-transform:rotate(0deg) translateZ(0);
    transform:rotate(0deg) translateZ(0);
  }
  .pullDown.loading .pullDownIcon, .pullUp.loading .pullUpIcon {
    background-position:0 100%;
    -webkit-transform:rotate(0deg) translateZ(0);
    transform:rotate(0deg) translateZ(0);
    -webkit-transition-duration:0ms;
    transition-duration:0ms;

    -webkit-animation-name:loading;
    animation-name:loading;
    -webkit-animation-duration:2s;
    animation-duration:2s;
    -webkit-animation-iteration-count:infinite;
    animation-iteration-count:infinite;
    -webkit-animation-timing-function:linear;
    animation-timing-function:linear;
  }
  @-webkit-keyframes loading {
    from {
      -webkit-transform:rotate(0deg) translateZ(0);
      transform:rotate(0deg) translateZ(0);
    }
    to {
      -webkit-transform:rotate(360deg) translateZ(0);
      transform:rotate(360deg) translateZ(0);
    }
  }
  @keyframes loading {
    from {
      -webkit-transform:rotate(0deg) translateZ(0);
      transform:rotate(0deg) translateZ(0);
    }
    to {
      -webkit-transform:rotate(360deg) translateZ(0);
      transform:rotate(360deg) translateZ(0);
    }
  }
</style>
<script src="./BaseScroll"></script>

